#include "../core/external_libs/cx-lib/cx_typedef.h"
#include <stdio.h>
typedef struct
{
	int x;
	int y;
	int z;
	unsigned int quadrant;
}ipoint_t,*ipoint_pt;
cx_bool_t Arc_isEndOnTransition(ipoint_pt pstart,ipoint_pt ptransition, ipoint_pt end)
{
    if((end->x==ptransition->x) || (end->y == ptransition->y))
    {
        return cx_true;
    }
    else if(
    (end->x < ((ptransition->x > pstart->x)?ptransition->x:pstart->x)) && 
    (end->x > ((ptransition->x < pstart->x)?ptransition->x:pstart->x)) &&
    (end->y > ((ptransition->y < pstart->y)?ptransition->y:pstart->y)) && 
    (end->y < ((ptransition->y > pstart->y)?ptransition->y:pstart->y))
    )
    {
        return cx_true;
    }
    else
    {
        return cx_false;
    }
}

int main(void )
{
    ipoint_t transiton = 
    {
        .x = 0,
        .y = 5,
        .z = 0
    },
    end = 
    {
        .x = -3,
        .y = 4,
        .z = 0
    },
    start = 
    {
        .x = 5,
        .y = 0,
        .z = 0
    };
    printf("%s\n",(Arc_isEndOnTransition(&start,&transiton,&end) == cx_true)?"TRUE":"FALSE");
    return 0;
}